# 2.py
# 将函数放入字典

def func1():
  print(func1.__name__)

def func2():
  print(func2.__name__)

def func3():
  print(func3.__name__)

def default():
  print(default.__name__)


dict1 = {
  1: func1,
  2: func2,
  3: func3,
}

calling = dict1.get(2,default)

calling()

